export const constantRoute = [
  {
    path: '/',
    component: () => import('../layout/myHome.vue'),
    name: 'animation'
  },
  {
    path: '/home',
    redirect: '/homePage',
    component: () => import('../views/home/myHome.vue'),
    children: [
      {
        path: '/homePage',
        component: () => import('../views/home/homePage.vue'),
        name: 'homePage'
      },
      {
        path: '/login',
        component: () => import('../views/login/myLogin.vue'),
        name: 'login'
      },
      {
        path: '/register',
        component: () => import('../views/login/myRegister.vue'),
        name: 'register'
      },
      {
        path: '/layout',
        component: () => import('../layout/myIndex.vue'),
        name: 'index'
      },
      {
        path: '/course',
        component: () => import('../views/course/myIndex.vue'),
        name: 'course',
        redirect: '/course/test1?id=0',
        children: [
          {
            path: '/course/test1',
            component: () => import('../views/course/test1.vue')
          },
          {
            path: '/course/test2',
            component: () => import('../views/course/test2.vue')
          }
        ],
      },
      {
        path: '/function',
        redirect: '/function/AI',
        component: () => import('../views/function/myIndex.vue'),
        name: 'function',
        children: [
          {
            path: '/function/AI',
            component: () => import('../views/function/aiTutor.vue'),
            name: 'AI'
          },
          {
            path: '/function/discuss',
            redirect: '/function/discuss/new-reply',
            component: () => import('../views/function/discuss.vue'),
            name: 'discuss',
            children: [
              {
                path: '/function/discuss/new-reply',
                component: () => import('../views/function/components/newReply.vue'),
                name: 'newReply'
              },
              {
                path: '/function/discuss/new-publish',
                component: () => import('../views/function/components/newPublish.vue'),
                name: 'newPublish'
              }
            ]
          },
          {
            path: '/function/geometry-space',
            component: () => import('../views/function/geometrySpace.vue'),
            name: 'geometrySpace'
          },
          {
            path: '/function/tasks',
            component: () => import('../views/function/tasks.vue'),
            name: 'tasks'
          }
        ]
      },
      {
        path: '/about',
        component: () => import('../views/about/myIndex.vue'),
        name: 'about'
      },
      {
        path: '/usercenter',
        component: () => import('../views/usercenter/myIndex.vue'),
        name: 'usercenter'
      },
      {
        path: '/usercenter/knowledge-card',
        component: () => import('../views/usercenter/knowCard.vue'),
        name: 'knowCard'
      }
    ]
  },
  {
    path: '/exam',
    component: () => import('../views/exam/index.vue'),
    name: 'exam',
    meta: {
      title: '测试',
      hidden: true,
      icon: ''
    }
  },
  {
    path: '/404',
    component: () => import('@/views/404/index.vue'),
    name: '404',
    meta: {
      title: '404'
    }
  },
  {
    path: '/:pathMatch(.*)*',
    redirect: '/404',
    name: 'Any',
    meta: {
      title: 'Any'
    }
  }
]
